import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:mandoby/core/utils/app_colors.dart';
import 'package:mandoby/core/widgets/custom_elevated_button.dart';
import 'package:mandoby/features/home/presentation/pages/home_screen.dart';
import 'package:nb_utils/nb_utils.dart';

import '../../../../core/app_export.dart';

class FinshScreen extends StatelessWidget {
  const FinshScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return WillPopScope(
      onWillPop: () async{
        HomeScreen().launch(context,isNewTask: true);
        return false;
      },
      child: Scaffold(
        backgroundColor: AppColors.primary,
        body: Column(
            crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            200.hs,
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                CustomImageView(imagePath: AppAssets.imgRectangle22,height: 80.w,width: 200.w,fit: BoxFit.fill,color: AppColors.whiteA700,),
              ],
            ).animate().slideY(),
            50.hs,
            Container(
              height: 100.h,width: 100.w,
              child: Icon(Icons.manage_accounts_outlined,),
              decoration: BoxDecoration(
                shape: BoxShape.circle,
                color: AppColors.whiteA700
              ),
            ).animate().fadeIn(),
            50.hs,
            Text("تم تقديم الطلب",style: CustomTextStyles.font36whiteA700W600,).animate().shakeX(duration: 650.ms),

            50.hs,
            CustomElevatedButton(
              width: 180.w,
              onPressed: () {
                HomeScreen().launch(context,isNewTask: true);
              },
              buttonTextStyle: CustomTextStyles.font20black500,
              text: "خروج",buttonStyle: ButtonStyle(backgroundColor: MaterialStatePropertyAll(AppColors.whiteA700)),)

          ],
        ),

      ),
    );
  }
}
